<template>
    <div ref="chart" style="width: 600px; height: 400px;"></div>
</template>
<script>

import { Icon } from 'ant-design-vue';
import * as echarts from 'echarts';
const IconFont = Icon.createFromIconfontCN({
  scriptUrl: '//at.alicdn.com/t/font_8d5l8fzk5b87iudi.js',
});
export default {
  components: {
    IconFont,
  },
  // mixins: [preventBack], //禁止返回上一页
  data() {
    return {
      chart: null,
    };
  },
  mounted() {
    this.initChart();
  },
  methods: {
    initChart() {
      this.chart = echarts.init(this.$refs.chart);
      const option = {
        title: {
          text: '均值直方图'
        },
        tooltip: {},
        xAxis: {
          data: ["226.920", "226.980", "226.940", "227.040", "226.960"]
        },
        yAxis: {},
        series: [{
          name: '均值',
          type: 'bar',
          data: [5, 20, 36, 10, 75]
        }]
      };
      this.chart.setOption(option);
    }
  }
};


</script>
<style scoped>
.icons-list >>> .anticon {
  margin-right: 6px;
  font-size: 24px;
}
</style>